﻿using Rabbit.Contracts.Interface;
using Rabbit.Domain.Entity;
using Rabbit.Domain.IRepository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Rabbit.Service
{
    public class BreedService : IBreedService
    {
        private readonly IBreedRepository _breedRepository;

        public BreedService(IBreedRepository breedRepository)
        {
            _breedRepository = breedRepository;
        }

        public int GetBreedAdd(Breed breed)
        {
           return _breedRepository.GetBreedAdd(breed);
        }

        /// <summary>
        /// 反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public dynamic GetBreedFind(int id)
        {
            return _breedRepository.GetBreedFind(id);
        }

        public List<Breed> GetBreedShow(int id)
        {
            return _breedRepository.GetBreedShow(id);
        }

        public int GetBreedUpd(Breed breed)
        {
            return _breedRepository.GetBreedUpd(breed);
        }

        public int GetHealthAdd(Health health)
        {
           var list=_breedRepository.GetHealthAdd(health);
            return list;
        }

        public int GetHealthDel(int id)
        {
            var list=_breedRepository.GetHealthDel(id);
            return list;
        }

        
        public List<Health> GetHealthShow()
        {
            var list=_breedRepository.GetHealthShow();
            return list;
        }

        public int GetHealthUpd(Health health)
        {
            var list=_breedRepository.GetHealthUpd(health);
            return list;
        }
        public dynamic GetHealthFind(int id)
        {
            var list = _breedRepository.GetHealthFind(id);
            return list;
        }

        public List<Ycompany> GetYcompanShow()
        {
            return _breedRepository.GetYcompanShow();
        }

        public dynamic GetYcompanyFind(int id)
        {
            return _breedRepository.GetYcompanyFind(id);
        }

        public int GetYcompanyUpd(Ycompany ycompany)
        {
            return _breedRepository.GetYcompanyUpd(ycompany);
        }

        /// <summary>
        /// 动检添加
        /// </summary>
        /// <param name="animal"></param>
        /// <returns></returns>
        public int GetAnimalAdd(Animal animal)
        {
            return _breedRepository.GetAnimalAdd(animal);           
        }

        /// <summary>
        /// 动检显示
        /// </summary>
        /// <returns></returns>
        public List<Animal> GetAnimalShow()
        {
            return _breedRepository.GetAnimalShow();
        }

        public int GetYimgAdd(Yimg yimg)
        {
            return _breedRepository.GetYimgAdd(yimg);
        }

        public List<Yimg> GetYimgShow()
        {
            return _breedRepository.GetYimgShow();
        }
    }
}
